package com.wr.online.test.util;

import org.apache.ibatis.transaction.TransactionException;

/**
 * @author ：GZHU_WANG
 * @date ：Created in 2021/10/19 15:25
 * @description：检查事务是否成功
 */
public class TransactionalUtils {
    /**
     * 检查事务是否成功
     * @param num
     * @return
     */
    public static boolean checkTransactional(int num){
        if(num <= 0) {
            throw new TransactionException("操作失败!可能找不到对应ID");
        }
        return true;
    }
}
